<?php

?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css">
		<script type="text/javascript" src="../js/jquery-3.1.1.js"></script>
		<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	</head>
<body>
<?php
	session_start();
	if(isset($_SESSION['username'])){
?>
	<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<ul class="nav nav-tabs" style="padding: 2%;">
<?php
	if($_SESSION['role']>='1'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">查看信息<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="ckbks.php">本科生</a>
						</li>
						<li>
							 <a href="ckyjs.php">研究生</a>
						</li>
						<li>
							 <a href="ckbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?php
	}
?>
<?php
	if($_SESSION['role']>='2'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">预修改信息<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="../yxg/yxgbks.php">本科生</a>
						</li>
						<li>
							 <a href="../yxg/yxgyjs.php">研究生</a>
						</li>
						<li>
							 <a href="../yxg/yxgbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?php
	}
?>
<?php
	if($_SESSION['role']>='3'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">预修改信息审核<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="../check/checkbks.php">本科生</a>
						</li>
						<li>
							 <a href="../check/checkyjs.php">研究生</a>
						</li>
						<li>
							 <a href="../check/checkbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?}
if($_SESSION['role']>='4'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">直接修改信息<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="../xg/xgbks.php">本科生</a>
						</li>
						<li>
							 <a href="../xg/xgyjs.php">研究生</a>
						</li>
						<li>
							 <a href="../xg/xgbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?php
	}
?>
				<li class="dropdown pull-right">
					 <a href="#" data-toggle="dropdown" class="dropdown-toggle">用户<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="#">更改密码</a>
						</li>
						<li class="divider">
						</li>
						<li>
							 <a href="../logout.php">注销</a>
						</li>
					</ul>
				</li>
			</ul>
			<ul class="breadcrumb">
				<li>
					 查看信息
				</li>
				<li class="active">
					博士生
				</li>
			</ul>
		<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
			<input name="cz" type="text" placeholder="学号、姓名或学院"/>
			<button class="btn-primary" type="submit">搜索</button>
		</form>
		<?
			$sql = "SELECT * FROM phd";
			$search = "";
			if($_SERVER["REQUEST_METHOD"] == "POST") 
			{
				if($_POST["cz"])
					$search = $_POST["cz"];
				if($search != "")
				{
					if($search[0]>='0'&&$search[0]<='9')
						$sql = $sql." where xh like '$search%'";
					else
					{
						$sql = $sql." where xm like '$search%' or yxmc='$search'";
					}				
				}
			}
		?>
			<table class="table table-bordered">
				<thead>
					<tr>
						<th><font color=black>学号</font></th>
						<th><font color=black>姓名</font></th>
						<th><font color=black>高中学籍材料</font></th>
						<th><font color=black>高考报名登记表</font></th>
						<th><font color=black>大学生登记表</font></th>
						<th><font color=black>大学毕业生登记表</font></th>
						<th><font color=black>大学历年成绩表</font></th>
						<th><font color=black>学士学位审批材料</font></th>
						<th><font color=black>硕士录取登记表</font></th>
						<th><font color=black>硕士研究生登记表</font></th>
						<th><font color=black>硕士学位审批材料</font></th>
						<th><font color=black>硕士成绩单</font></th>
						<th><font color=black>博士录取登记表</font></th>
						<th><font color=black>专家推荐信及其它</font></th>
						<th><font color=black>教师资格认定申请表</font></th>
						<th><font color=black>工作期间形成的材料</font></th>
						<th><font color=black>入学前其他阶段派遣证</font></th>
						<th><font color=black>入团志愿书</font></th>
						<th><font color=black>入党志愿书</font></th>
						<th><font color=black>入党申请书</font></th>
						<th><font color=black>入党其它材料</font></th>
						<th><font color=black>其它材料</font></th>
						<th><font color=black>备注</font></th>
					</tr>
				</thead>
	<tbody>
<?php 	
	include_once("../conn.php");
	$result = mysql_query($sql);
	while($row = mysql_fetch_array($result))
		{?>
	<tr>
		<td><font color=black><?=$row['xh'] ?></font></td>
		<td style="width: 60px"><font color=black><?=$row['xm'] ?></font></td>
		<td><font color=black><?=$row['gzxj'] ?></font></td>
		<td><font color=black><?=$row['gkbm'] ?></font></td>
		<td><font color=black><?=$row['dxsdjb'] ?></font></td>
		<td><font color=black><?=$row['dxbydjb'] ?></font></td>
		<td><font color=black><?=$row['bkcj'] ?></font></td>
		<td><font color=black><?=$row['bkxwsp'] ?></font></td>
		<td><font color=black><?=$row['sslq'] ?></font></td>
		<td><font color=black><?=$row['ssdjb'] ?></font></td>
		<td><font color=black><?=$row['ssbydjb'] ?></font></td>
		<td><font color=black><?=$row['ssxwsp'] ?></font></td>
		<td><font color=black><?=$row['sscj'] ?></font></td>
		<td><font color=black><?=$row['bslq'] ?></font></td>
		<td><font color=black><?=$row['tjx'] ?></font></td>
		<td><font color=black><?=$row['jszgrdb'] ?></font></td>
		<td><font color=black><?=$row['gzcl'] ?></font></td>
		<td><font color=black><?=$row['pqz'] ?></font></td>
		<td><font color=black><?=$row['rtzys'] ?></font></td>
		<td><font color=black><?=$row['rdzys'] ?></font></td>
		<td><font color=black><?=$row['rdsqs'] ?></font></td>
		<td><font color=black><?=$row['rdqtcl'] ?></font></td>
		<td><font color=black><?=$row['qtcl'] ?></font></td>
		<td><font color=black><?=$row['bz'] ?></font></td>
	</tr>	
	<?}?>		
		</tbody>
		</table>
		</div>
	</div>
</div>
<?php }else{?>
<script>
	alert("请登录");
	window.location.href = 'login.html';
</script>
<?}?>
</body>
</html>
